<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form:form method="POST" commandName="obj">
	<c:set var="now" value="<%=new java.util.Date()%>" />
		<fieldset>
			<legend>Xe Duoc Tim Thay</legend>
			<table class="tb-content">
				
					<tr>
						<td>Năm sản xuất</td>
						<td>Màu xe</td>
						<td>BKS</td>
						<td>Kiểu nhiên liệu</td>
						<td>Kiểu hộp số</td>
						<td>Tình trạng</td>
					</tr>
					<c:forEach items="${objs}" var="item">
					<tr>
						<td><fmt:formatDate pattern="yyyy" value="${item.year}"/></td>
						<td>${item.color}</td>
						<td>${item.regNumber}</td>
						<td>
						<c:set var="fuel" scope="session" value="${item.fuelType}"/>
						<c:if test="${fuel == 1}">
							<c:out value="Xăng"/>
						</c:if>
						<c:if test="${fuel == 2}">
							<c:out value="Dầu"/>
						</c:if>
						</td>
						<td>
						<c:set var="trans" scope="session" value="${item.transmission}"/>
						<c:if test="${trans == 1}">
							<c:out value="Số sàn(MT)"/>
						</c:if>
						<c:if test="${trans == 2}">
							<c:out value="Số tự động(AT)"/>
						</c:if>
						</td>
						<td>
						<c:set var="status" scope="session" value="${item.status}"/>
						<c:if test="${status == 1}">
							<c:out value="Đang được thuê"/>
						</c:if>
						<c:if test="${status == 2}">
							<c:out value="Chưa được thuê"/>
						</c:if>
						</td>
					</tr>
				</c:forEach>
			</table>
		</fieldset>
	</form:form>
</body>
</html>